{% extends 'ZillaFrontBundle::layout.html.twig' %}

{% block javascripts %} 
    {{ parent() }}
    {% javascripts 
    '@ZillaFrontBundle/Resources/public/js/store.js'
     output='js/compiled/store.js' filter='?yui_js'
    %}               
    <script src="{{ asset_url }}"></script>        
    {% endjavascripts %}   
{% endblock %}
            
{% block stylesheets %}       
    {{ parent() }}
    {% stylesheets
    '@ZillaFrontBundle/Resources/public/css/store.css'
    output='css/compiled/store.css' filter='cssrewrite,?yui_css'
    %}
    <link rel="stylesheet" type="text/css" media="all" href="{{ asset_url }}" />
    {% endstylesheets %}
{% endblock %}

{% block content %}
    <div id="storeContainer">
        {% if stores | length > 0 %}
            {% for store in stores %}
                <div id="{{ store.alias }}" class="store-element">
                    {{ store.title }}
                    <span class="wink-store">wink me</span>
                    {% if store.owner==app.user %}
                        <a href="{{ path('editStore', {'alias' : store.alias}) }}" accesskey="e" title="edit promotion">
                            edit
                        </a>
                    {% endif %}
                </div>
            {% endfor %}
        {% else %}
            no stores
        {% endif %}
    </div>
{% endblock %}

